#ifndef COMPOUNDGRAPHOPERATION_H_
#define COMPOUNDGRAPHOPERATION_H_

#include "graphsupport/graph/operation/IGraphOperation.h"

#include <stdarg.h>

class CompoundGraphOperation : public IGraphOperation
{
public:
	/**
	 * IGraphOperationPtr createOperation( IGraphOperation ... subOperations );
	 * wraps each of subOperations in IGraphOperationPtr
	 *
	 * CompoundGraphOperation::createOperation( new IGraphOperation() ).get()
	 * 										-- is CompoundGraphOperation *
	 */
	// TODO: it is dangerously to use this constructor -- remove it
	static IGraphOperationPtr createOperation( int count, ... );

	CompoundGraphOperation();

	virtual void applyTo( Graph & graph, IOperationSettings & genSettings );

public:
	void addSubOperation( const IGraphOperationPtr & subOperation );


private:
	IGraphOperationPtrVec suboperations;
};

#endif /* COMPOUNDGRAPHOPERATION_H_ */
